﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria
{
	// Token: 0x0200000E RID: 14
	public abstract class Entity
	{
		// Token: 0x17000023 RID: 35
		// (get) Token: 0x060000C7 RID: 199 RVA: 0x00006709 File Offset: 0x00004909
		// (set) Token: 0x060000C8 RID: 200 RVA: 0x0000673A File Offset: 0x0000493A
		public Vector2 Center
		{
			get
			{
				return new Vector2(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2));
			}
			set
			{
				this.position = new Vector2(value.X - (float)(this.width / 2), value.Y - (float)(this.height / 2));
			}
		}

		// Token: 0x17000024 RID: 36
		// (get) Token: 0x060000C9 RID: 201 RVA: 0x00006767 File Offset: 0x00004967
		// (set) Token: 0x060000CA RID: 202 RVA: 0x0000678E File Offset: 0x0000498E
		public Vector2 Left
		{
			get
			{
				return new Vector2(this.position.X, this.position.Y + (float)(this.height / 2));
			}
			set
			{
				this.position = new Vector2(value.X, value.Y - (float)(this.height / 2));
			}
		}

		// Token: 0x17000025 RID: 37
		// (get) Token: 0x060000CB RID: 203 RVA: 0x000067B1 File Offset: 0x000049B1
		// (set) Token: 0x060000CC RID: 204 RVA: 0x000067E0 File Offset: 0x000049E0
		public Vector2 Right
		{
			get
			{
				return new Vector2(this.position.X + (float)this.width, this.position.Y + (float)(this.height / 2));
			}
			set
			{
				this.position = new Vector2(value.X - (float)this.width, value.Y - (float)(this.height / 2));
			}
		}

		// Token: 0x17000026 RID: 38
		// (get) Token: 0x060000CD RID: 205 RVA: 0x0000680B File Offset: 0x00004A0B
		// (set) Token: 0x060000CE RID: 206 RVA: 0x00006832 File Offset: 0x00004A32
		public Vector2 Top
		{
			get
			{
				return new Vector2(this.position.X + (float)(this.width / 2), this.position.Y);
			}
			set
			{
				this.position = new Vector2(value.X - (float)(this.width / 2), value.Y);
			}
		}

		// Token: 0x17000027 RID: 39
		// (get) Token: 0x060000CF RID: 207 RVA: 0x00006855 File Offset: 0x00004A55
		// (set) Token: 0x060000D0 RID: 208 RVA: 0x0000685D File Offset: 0x00004A5D
		public Vector2 TopLeft
		{
			get
			{
				return this.position;
			}
			set
			{
				this.position = value;
			}
		}

		// Token: 0x17000028 RID: 40
		// (get) Token: 0x060000D1 RID: 209 RVA: 0x00006866 File Offset: 0x00004A66
		// (set) Token: 0x060000D2 RID: 210 RVA: 0x0000688B File Offset: 0x00004A8B
		public Vector2 TopRight
		{
			get
			{
				return new Vector2(this.position.X + (float)this.width, this.position.Y);
			}
			set
			{
				this.position = new Vector2(value.X - (float)this.width, value.Y);
			}
		}

		// Token: 0x17000029 RID: 41
		// (get) Token: 0x060000D3 RID: 211 RVA: 0x000068AC File Offset: 0x00004AAC
		// (set) Token: 0x060000D4 RID: 212 RVA: 0x000068DB File Offset: 0x00004ADB
		public Vector2 Bottom
		{
			get
			{
				return new Vector2(this.position.X + (float)(this.width / 2), this.position.Y + (float)this.height);
			}
			set
			{
				this.position = new Vector2(value.X - (float)(this.width / 2), value.Y - (float)this.height);
			}
		}

		// Token: 0x1700002A RID: 42
		// (get) Token: 0x060000D5 RID: 213 RVA: 0x00006906 File Offset: 0x00004B06
		// (set) Token: 0x060000D6 RID: 214 RVA: 0x0000692B File Offset: 0x00004B2B
		public Vector2 BottomLeft
		{
			get
			{
				return new Vector2(this.position.X, this.position.Y + (float)this.height);
			}
			set
			{
				this.position = new Vector2(value.X, value.Y - (float)this.height);
			}
		}

		// Token: 0x1700002B RID: 43
		// (get) Token: 0x060000D7 RID: 215 RVA: 0x0000694C File Offset: 0x00004B4C
		// (set) Token: 0x060000D8 RID: 216 RVA: 0x00006979 File Offset: 0x00004B79
		public Vector2 BottomRight
		{
			get
			{
				return new Vector2(this.position.X + (float)this.width, this.position.Y + (float)this.height);
			}
			set
			{
				this.position = new Vector2(value.X - (float)this.width, value.Y - (float)this.height);
			}
		}

		// Token: 0x1700002C RID: 44
		// (get) Token: 0x060000D9 RID: 217 RVA: 0x000069A2 File Offset: 0x00004BA2
		// (set) Token: 0x060000DA RID: 218 RVA: 0x000069B7 File Offset: 0x00004BB7
		public Vector2 Size
		{
			get
			{
				return new Vector2((float)this.width, (float)this.height);
			}
			set
			{
				this.width = (int)value.X;
				this.height = (int)value.Y;
			}
		}

		// Token: 0x1700002D RID: 45
		// (get) Token: 0x060000DB RID: 219 RVA: 0x000069D3 File Offset: 0x00004BD3
		// (set) Token: 0x060000DC RID: 220 RVA: 0x000069FE File Offset: 0x00004BFE
		public Rectangle Hitbox
		{
			get
			{
				return new Rectangle((int)this.position.X, (int)this.position.Y, this.width, this.height);
			}
			set
			{
				this.position = new Vector2((float)value.X, (float)value.Y);
				this.width = value.Width;
				this.height = value.Height;
			}
		}

		// Token: 0x060000DD RID: 221 RVA: 0x00006A31 File Offset: 0x00004C31
		public float AngleTo(Vector2 Destination)
		{
			return (float)Math.Atan2((double)(Destination.Y - this.Center.Y), (double)(Destination.X - this.Center.X));
		}

		// Token: 0x060000DE RID: 222 RVA: 0x00006A5F File Offset: 0x00004C5F
		public float AngleFrom(Vector2 Source)
		{
			return (float)Math.Atan2((double)(this.Center.Y - Source.Y), (double)(this.Center.X - Source.X));
		}

		// Token: 0x060000DF RID: 223 RVA: 0x00006A8D File Offset: 0x00004C8D
		public float Distance(Vector2 Other)
		{
			return Vector2.Distance(this.Center, Other);
		}

		// Token: 0x060000E0 RID: 224 RVA: 0x00006A9B File Offset: 0x00004C9B
		public float DistanceSQ(Vector2 Other)
		{
			return Vector2.DistanceSquared(this.Center, Other);
		}

		// Token: 0x060000E1 RID: 225 RVA: 0x00006AA9 File Offset: 0x00004CA9
		public Vector2 DirectionTo(Vector2 Destination)
		{
			return Vector2.Normalize(Destination - this.Center);
		}

		// Token: 0x060000E2 RID: 226 RVA: 0x00006ABC File Offset: 0x00004CBC
		public Vector2 DirectionFrom(Vector2 Source)
		{
			return Vector2.Normalize(this.Center - Source);
		}

		// Token: 0x060000E3 RID: 227 RVA: 0x00006ACF File Offset: 0x00004CCF
		public bool WithinRange(Vector2 Target, float MaxRange)
		{
			return Vector2.DistanceSquared(this.Center, Target) <= MaxRange * MaxRange;
		}

		// Token: 0x0400008D RID: 141
		public int whoAmI;

		// Token: 0x0400008E RID: 142
		public bool active;

		// Token: 0x0400008F RID: 143
		public Vector2 position;

		// Token: 0x04000090 RID: 144
		public Vector2 velocity;

		// Token: 0x04000091 RID: 145
		public Vector2 oldPosition;

		// Token: 0x04000092 RID: 146
		public Vector2 oldVelocity;

		// Token: 0x04000093 RID: 147
		public int oldDirection;

		// Token: 0x04000094 RID: 148
		public int direction = 1;

		// Token: 0x04000095 RID: 149
		public int width;

		// Token: 0x04000096 RID: 150
		public int height;

		// Token: 0x04000097 RID: 151
		public bool wet;

		// Token: 0x04000098 RID: 152
		public bool honeyWet;

		// Token: 0x04000099 RID: 153
		public byte wetCount;

		// Token: 0x0400009A RID: 154
		public bool lavaWet;
	}
}
